import java.io.File;

public class exercise_5 {
 public static void main(String[] args) {
	File  file = new File("D:\\");
	File[] filelist = file.listFiles();
	int count = 1;
	for(File f:filelist) {
		if(f.isFile()) {
			System.out.println(f.getName()+" "+count++);
		}
	}
	
	for(File f:filelist) {
		if(f.isDirectory()) {
			System.out.println(f.getName()+" "+count++);
		}
	}
}
}
